package com.lz.sports

import android.app.Activity
import android.os.Bundle
import com.lz.library.base.BaseApp
import com.lz.library.extension.whiteStatusBar

/**
 *  author: you : 2020/05/28
 */
class App : BaseApp() {

    override fun initApp() {
        registerAppInit("com.lz.comm.CommAppInitModule")
        registerAppInit("com.lz.sports.AppInitModule")
        registerActivityLifecycleCallbacks(AppActivityLifecycleCallbacks())
    }

    class AppActivityLifecycleCallbacks : ActivityLifecycleCallbacks {

        override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {
            activity.whiteStatusBar()
        }

        override fun onActivityStarted(activity: Activity) {
        }

        override fun onActivityResumed(activity: Activity) {
        }

        override fun onActivityPaused(activity: Activity) {
        }

        override fun onActivityStopped(activity: Activity) {
        }

        override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) {
        }

        override fun onActivityDestroyed(activity: Activity) {
        }
    }

}